<template>
  <div>
    <!-- 三级联动全局组件，不需要引入 -->
    <TypeNav />
    <ListContainer />
    <Recommend />
    <Rank />
    <Like />
    <Floor v-for="(floor, index) in floorList" :key="floorList.id" :list="floor" />
    <Brand />
  </div>
</template>

<script>
import {mapState} from 'vuex'
// 引入list组件
import ListContainer from "@/views/Home/ListContainer";
import Recommend from "@/views/Home/Recommend";
import Rank from "@/views/Home/Rank";
import Like from "@/views/Home/Like";
import Floor from "@/views/Home/Floor";
import Brand from "@/views/Home/Brand";

export default {
  components: {
    ListContainer,
    Recommend,
    Rank,
    Like,
    Floor,
    Brand,
  },

  data() {
    return {};
  },

  computed: {
     ...mapState({floorList:state=>state.home.floorList})
  },

  methods: {},
 
  mounted() {
    this.$store.dispatch("getFloorList");
  },
};
</script>
<style lang='css' scoped>
</style>